import vue from 'vue'
vue.filter('price',function(v){
    v = v + ''
    let value = v.split('.')
    if(!value[1]){
        return v + '.00'
    }
    if(value[1].length > 2){
        return v.toFixed(2)
    }
    else if(value[1].length == 2){
        return v
    }
    else if(value[1].length == 1){
        return v + '0'
    }
    else{
        return v + '.00'
    }
})